//
//  NoServiceBuyersView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/10.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "NoServiceBuyersView.h"

@implementation NoServiceBuyersView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        GLGWImageView * imageView = [[GLGWImageView alloc] initWithImageName:@"hh" inSuperView:self];
        imageView.backgroundColor = kRandomColor;
        [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.mas_top).offset(kHeightProportion_In_iPhoneTriploid(64));
            make.centerX.equalTo(self);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(60)));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(61)));
        }];
        //
        GLGWLabel * noServiceLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self];
        noServiceLabel.text = @"暂无服务中买家";
        [noServiceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self);
            make.top.equalTo(imageView.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(20));
        }];
        //adress_gord
        GLGWButton * addbut = [[GLGWButton alloc] initWithTitle:@"新增买家信息" titleLableFont:SYSTEMFONT(14) titleLableColor:[UIColor whiteColor] theCornerRadius:kHeightProportion_In_iPhoneTriploid(22) backgroundColr:kColor_Rule_Yellow inSuperView:self];
        addbut.image_Name = @"adress_gord";
        [addbut setImagePositionWithType:SSImagePositionTypeLeft spacing:kWidthProportion_In_iPhoneTriploid(10)];
        [addbut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.mas_left).offset(kWidthProportion_In_iPhoneTriploid(70));
            make.top.equalTo(noServiceLabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(48));
            make.right.equalTo(self.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(70));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(44)));
        }];
        [addbut addTarget:self action:@selector(addNewBuyers) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

-(void)addNewBuyers{
    if (self.Block_AddNewBuyers) {
        self.Block_AddNewBuyers();
    }
}

@end
